TeamB

How to test it

To get site like this you are currently seeing you need to simply curl clone url, name and your email as post params. No account creation is needed now.


curl -X POST 'https://mvp.brodocs.io/api/sites/init' -F "email=..." -F "name=Test site" -F "repo=https://github.com/brodocsdev/docs.git"

You should see output like this:

Started. Your userId is: ef1....

...

Site index.html: https://mvp.brodocs.io/ef1.../index.html
Site generate in: 574ms

The userId (equals site id) is hash of your email and first clone url. If the git repo is private, create a dedicated token with your repository provider and pass it as another post parameter when calling init.

curl -X POST ... -F "key=ghp_abcd..."

The key is not stored, so you needed to provide it again when sending site update request. If you see Server busy message, try later, simply try later in a minute. There is a limit of concurrent sites build in order not to kill this single instance server, which both builds sites ans serves static files.

Multiple repositories

You may want to add more repositories of your micro (nano 😎) repos. They all will be visible on left pane menu, e.g. TeamA:

curl -X POST 'https://mvp.brodocs.io/api/sites/init' -F "email=..." -F "name=TeamA" -F "repo=https://github.com/MrLesk/Backlog.md.git" -F "repo=https://github.com/brodocsdev/docs.git"

or you may want to construct multisite with top menu from multiple repos, then some simple yaml manifest is needed.

Updates

When you push some updates, send update request via curl

curl -X POST 'https://mvp.brodocs.io/api/sites/ef1.../pull' -F "key=ghp_abcd..."

or setup proper repo provider action, e.g github action.

Brodocs MVP